<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        
        
        <link rel="shortcut icon" href="../../img/favicon.ico">
        <title>Main - 络绎直播</title>
        <link href="../../css/bootstrap.min.css" rel="stylesheet">
        <link href="../../css/font-awesome.min.css" rel="stylesheet">
        <link href="../../css/base.css" rel="stylesheet">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">

        <script src="../../js/jquery-1.10.2.min.js" defer></script>
        <script src="../../js/bootstrap.min.js" defer></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
        <script>hljs.initHighlightingOnLoad();</script> 
    </head>

    <body>
        <div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
            <div class="container">
                <a class="navbar-brand" href="../..">络绎直播</a>
                <!-- Expander button -->
                <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <!-- Expanded navigation -->
                <div id="navbar-collapse" class="navbar-collapse collapse">
                        <!-- Main navigation -->
                        <ul class="nav navbar-nav">
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">首页 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../.." class="dropdown-item">Main</a>
</li>
                                    
<li>
    <a href="../topic/" class="dropdown-item">话题</a>
</li>
                                    
<li>
    <a href="../search/" class="dropdown-item">搜索</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">用户 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../../user/user/" class="dropdown-item">Main</a>
</li>
                                    
<li>
    <a href="../profile/" class="dropdown-item">Profile</a>
</li>
                                    
<li>
    <a href="../user/" class="dropdown-item">个人主页</a>
</li>
                                    
<li>
    <a href="../fans/" class="dropdown-item">关注/好友</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">直播 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../meeting/" class="dropdown-item">Main</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">科学家 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../scientist/" class="dropdown-item">Main</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">论文 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../article/" class="dropdown-item">Main</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown active">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">通知 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="./" class="dropdown-item active">Main</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">管理后台 <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../../admin/admin/" class="dropdown-item">Main</a>
</li>
                                    
<li>
    <a href="../../admin/admin_sys/" class="dropdown-item">系统管理</a>
</li>
                                    
<li>
    <a href="../../admin/admin_user/" class="dropdown-item">用户管理</a>
</li>
                                    
<li>
    <a href="../../admin/admin_tag/" class="dropdown-item">标签管理</a>
</li>
                                    
<li>
    <a href="../../admin/admin_article/" class="dropdown-item">论文管理</a>
</li>
                                    
<li>
    <a href="../../admin/admin_meeting/" class="dropdown-item">会议管理</a>
</li>
                                    
<li>
    <a href="../../admin/admin_profile/" class="dropdown-item">用户配置管理</a>
</li>
                                    
<li>
    <a href="../../admin/admin_album/" class="dropdown-item">专辑管理</a>
</li>
                                    
<li>
    <a href="../../admin/admin_banner/" class="dropdown-item">广告位管理</a>
</li>
                                    
<li>
    <a href="../../admin/admin_feed/" class="dropdown-item">推荐管理</a>
</li>
                                    
<li>
    <a href="../../admin/admin_cert/" class="dropdown-item">审核管理</a>
</li>
                                </ul>
                            </li>
                        </ul>

                    <ul class="nav navbar-nav ml-auto">
                        <li class="nav-item">
                            <a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
                                <i class="fa fa-search"></i> Search
                            </a>
                        </li>
                            <li class="nav-item">
                                <a rel="prev" href="../article/" class="nav-link">
                                    <i class="fa fa-arrow-left"></i> Previous
                                </a>
                            </li>
                            <li class="nav-item">
                                <a rel="next" href="../../admin/admin/" class="nav-link">
                                    Next <i class="fa fa-arrow-right"></i>
                                </a>
                            </li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="container">
            <div class="row">
                    <div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
    <div class="navbar-header">
        <button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
            <span class="fa fa-angle-down"></span>
        </button>
    </div>

    
    <div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
        <ul class="nav flex-column">
            
            <li class="nav-item" data-level="1"><a href="#_1" class="nav-link">自定义消息格式文档</a>
              <ul class="nav flex-column">
            <li class="nav-item" data-level="2"><a href="#_2" class="nav-link">修订记录</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#_3" class="nav-link">背景</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#_4" class="nav-link">产品说明</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#_5" class="nav-link">关键账户说明</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#_6" class="nav-link">接口说明</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#1000" class="nav-link">1000 通知消息</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#2000" class="nav-link">2000  通知</a>
              <ul class="nav flex-column">
              </ul>
            </li>
              </ul>
            </li>
        </ul>
    </div>
</div></div>
                    <div class="col-md-9" role="main">

<h1 id="_1">自定义消息格式文档</h1>
<div class="toc">
<ul>
<li><a href="#_1">自定义消息格式文档</a><ul>
<li><a href="#_2">修订记录</a></li>
<li><a href="#_3">背景</a></li>
<li><a href="#_4">产品说明</a></li>
<li><a href="#_5">关键账户说明</a></li>
<li><a href="#_6">接口说明</a></li>
<li><a href="#1000">1000 通知消息</a><ul>
<li><a href="#1001">1001)  我的消息通知</a><ul>
<li><a href="#_7">接口说明</a></li>
<li><a href="#_8">协议说明</a></li>
</ul>
</li>
<li><a href="#1002">1002)  与我相关协议</a><ul>
<li><a href="#_9">接口说明</a></li>
<li><a href="#_10">协议说明</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#2000">2000  通知</a><ul>
<li><a href="#2001">2001 )  举手状态变更通知</a><ul>
<li><a href="#_11">接口说明</a></li>
<li><a href="#_12">协议说明</a></li>
</ul>
</li>
<li><a href="#2002">2002 )  踢出用户通知</a><ul>
<li><a href="#_13">接口说明</a></li>
<li><a href="#_14">协议说明</a></li>
</ul>
</li>
<li><a href="#2003">2003 )  科学家认证结果通知</a><ul>
<li><a href="#_15">接口说明</a></li>
<li><a href="#_16">协议说明</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<h2 id="_2">修订记录</h2>
<hr />
<table>
<thead>
<tr>
<th>日期</th>
<th>作者</th>
<th>修订类型</th>
<th>修订内容</th>
<th>版本</th>
</tr>
</thead>
<tbody>
<tr>
<td>2021年04月07日</td>
<td>冷立纲</td>
<td>A</td>
<td>新增设计方案</td>
<td>1.0</td>
</tr>
</tbody>
</table>
<blockquote>
<p>【修订类型：A-新增  M-修改 D-删除】</p>
</blockquote>
<h2 id="_3">背景</h2>
<p>自定义消息格式文档</p>
<h2 id="_4">产品说明</h2>
<p>满足产品自定义展示消息</p>
<h2 id="_5">关键账户说明</h2>
<table>
<thead>
<tr>
<th align="center">用户ID</th>
<th align="center">身份</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">9999</td>
<td align="center">通知</td>
</tr>
<tr>
<td align="center">9998</td>
<td align="center">用户通知</td>
</tr>
<tr>
<td align="center">9997</td>
<td align="center">官方小二</td>
</tr>
</tbody>
</table>
<h2 id="_6">接口说明</h2>
<p>自定义协议格式说明</p>
<pre><code class="json">
        {
    &quot;SyncOtherMachine&quot;: 1, //消息同步至发送方
    &quot;From_Account&quot;: &quot;10001&quot;,
    &quot;To_Account&quot;: &quot;10002&quot;,
    &quot;MsgRandom&quot;: 1287657,
    &quot;MsgTimeStamp&quot;: 5454457,
    &quot;MsgBody&quot;: [
        {
            &quot;MsgType&quot;: &quot;TIMCustomElem&quot;, //自定义消息类型
            &quot;MsgContent&quot;: {    
                     &quot;type&quot;: 1,  //协议号 依次递增  具体格式参见下面协议定义
                     &quot;version&quot;:&quot;1.0&quot;, //协议版本号，本地配置目前能处理的版本号，高于该版本则提示需要升级识别        
                     &quot;tips&quot;:&quot;消息会话列表显示提示&quot;,
                     &quot;createTime&quot;: 1233434343l, //创建时间戳
                     &quot;msg&quot;:{                    //消息体
                      &quot;title&quot;:&quot;标题&quot;, //标题
                      &quot;url&quot;:&quot;http://kistalk.com&quot;, // h5 广告页面
                      &quot;content&quot;:&quot;这是消息内容&quot;,
                      &quot;imageUrl&quot;:&quot;头图地址&quot;, //相对地址，自行追加
                      &quot;coverWidth&quot;:300,  //高度
                      &quot;coverHeight&quot;:400   //宽度
                      }
            }
        }
    ]
}

</code></pre>

<h2 id="1000">1000 通知消息</h2>
<h3 id="1001">1001)  我的消息通知</h3>
<h4 id="_7">接口说明</h4>
<table>
<thead>
<tr>
<th align="left">Type</th>
<th align="center">1001</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">版本号</td>
<td align="center">1.0</td>
</tr>
</tbody>
</table>
<h4 id="_8">协议说明</h4>
<pre><code class="json">
      {    
                 &quot;type&quot;: 1001,  //协议号 依次递增  具体格式参见下面协议定义
                 &quot;version&quot;:&quot;1.0&quot;, //协议版本号，本地配置目前能处理的版本号，高于该版本则提示需要升级识别    
                 &quot;tips&quot;:&quot;消息会话列表显示提示&quot;,
                 &quot;createTime&quot;: 1233434343l, //创建时间戳
                 &quot;msg&quot;:{                    //文本消息
                     &quot;uid&quot;:12345 , //发送人
                     &quot;avatar&quot;:&quot;xxxx&quot; , //头像
                     &quot;name&quot;:&quot;名称&quot; , //名称
                     &quot;eventTime&quot;:123456789 , //直播时间
                     &quot;eventType&quot;:1 , //事件类型 1 发起会议预约  2 发起会议直播 3 预约开始通知  4 好奇通知
                     &quot;content&quot;:&quot;名称&quot; , //直播名称
                     &quot;targetId&quot;:1, //对象ID 用于跳转
                  }
        }


</code></pre>

<h3 id="1002">1002)  与我相关协议</h3>
<h4 id="_9">接口说明</h4>
<table>
<thead>
<tr>
<th align="left">Type</th>
<th align="center">1002</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">版本号</td>
<td align="center">1.0</td>
</tr>
</tbody>
</table>
<h4 id="_10">协议说明</h4>
<pre><code class="json">
      {    
                 &quot;type&quot;: 1002,  //协议号 依次递增  具体格式参见下面协议定义
                 &quot;version&quot;:&quot;1.0&quot;, //协议版本号，本地配置目前能处理的版本号，高于该版本则提示需要升级识别    
                 &quot;tips&quot;:&quot;消息会话列表显示提示&quot;,
                 &quot;createTime&quot;: 1233434343l, //创建时间戳
                 &quot;msg&quot;:{  
                     &quot;userList&quot;:[
                         {
                             &quot;uid&quot;:1,
                             &quot;avatar&quot;:&quot;/a&quot;,
                             &quot;name&quot;:&quot;xx&quot;
                         }
                     ],
                     &quot;eventType&quot;:1 , //事件类型 1 参与会议  2 一同参与会议 3 论文好奇  4  一同好奇
                     &quot;content&quot;:&quot;名称&quot; , //直播名称
                     &quot;targetId&quot;:1, //对象ID 用于跳转
                  }
        }


</code></pre>

<h2 id="2000">2000  通知</h2>
<h3 id="2001">2001 )  举手状态变更通知</h3>
<h4 id="_11">接口说明</h4>
<table>
<thead>
<tr>
<th align="left">Type</th>
<th align="center">2001</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">版本号</td>
<td align="center">1.0</td>
</tr>
<tr>
<td align="left">发送账号</td>
<td align="center">9997</td>
</tr>
<tr>
<td align="left">消息类型</td>
<td align="center">群组消息</td>
</tr>
</tbody>
</table>
<h4 id="_12">协议说明</h4>
<pre><code class="json">
      {    
                 &quot;type&quot;: 2001,  //协议号 依次递增  具体格式参见下面协议定义
                 &quot;version&quot;:&quot;1.0&quot;, //协议版本号，本地配置目前能处理的版本号，高于该版本则提示需要升级识别    
                 &quot;tips&quot;:&quot;消息会话列表显示提示&quot;,
                 &quot;createTime&quot;: 1233434343l, //创建时间戳
                 &quot;msg&quot;:{  
                &quot;meetingId&quot;: &quot;xxxxxx&quot; , //直播ID
                    &quot;handStatus&quot;: 0, // 举手状态 0 放下 1 举手  -1 拒绝
                    &quot;count&quot;:123, //举手人数  
                    &quot;uid&quot;:123 //用户ID  
                  }
        }


</code></pre>

<h3 id="2002">2002 )  踢出用户通知</h3>
<h4 id="_13">接口说明</h4>
<table>
<thead>
<tr>
<th align="left">Type</th>
<th align="center">2002</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">版本号</td>
<td align="center">1.0</td>
</tr>
<tr>
<td align="left">发送账号</td>
<td align="center">9997</td>
</tr>
<tr>
<td align="left">消息类型</td>
<td align="center">群组消息</td>
</tr>
</tbody>
</table>
<h4 id="_14">协议说明</h4>
<pre><code class="json">
      {    
                 &quot;type&quot;: 2002,  //协议号 依次递增  具体格式参见下面协议定义
                 &quot;version&quot;:&quot;1.0&quot;, //协议版本号，本地配置目前能处理的版本号，高于该版本则提示需要升级识别    
                 &quot;tips&quot;:&quot;消息会话列表显示提示&quot;,
                 &quot;createTime&quot;: 1233434343l, //创建时间戳
                 &quot;msg&quot;:{  
                &quot;meetingId&quot;: &quot;xxxxxx&quot; , //直播ID
                    &quot;uid&quot;:123 //用户ID  
                  }
        }


</code></pre>

<h3 id="2003">2003 )  科学家认证结果通知</h3>
<h4 id="_15">接口说明</h4>
<table>
<thead>
<tr>
<th align="left">Type</th>
<th align="center">2003</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">版本号</td>
<td align="center">1.0</td>
</tr>
<tr>
<td align="left">发送账号</td>
<td align="center">9997</td>
</tr>
<tr>
<td align="left">消息类型</td>
<td align="center">个人消息</td>
</tr>
</tbody>
</table>
<h4 id="_16">协议说明</h4>
<pre><code class="json">
      {    
                 &quot;type&quot;: 2003,  //协议号 依次递增  具体格式参见下面协议定义
                 &quot;version&quot;:&quot;1.0&quot;, //协议版本号，本地配置目前能处理的版本号，高于该版本则提示需要升级识别    
                 &quot;tips&quot;:&quot;消息会话列表显示提示&quot;,
                 &quot;createTime&quot;: 1233434343l, //创建时间戳
                 &quot;msg&quot;:{  
                &quot;status&quot;:  2 , //认证结果 2 通过 -1 驳回
                    &quot;uid&quot;:123 //用户ID  
                  }
        }


</code></pre></div>
            </div>
        </div>

        <footer class="col-md-12">
            <hr>
            <p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
        </footer>
        <script>
            var base_url = "../..",
                shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
        </script>
        <script src="../../js/base.js" defer></script>
        <script src="../../search/main.js" defer></script>

        <div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="searchModalLabel">Search</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
            <div class="modal-body">
                <p>
                    From here you can search these documents. Enter
                    your search terms below.
                </p>
                <form>
                    <div class="form-group">
                        <input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
                    </div>
                </form>
                <div id="mkdocs-search-results"></div>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
            <div class="modal-body">
              <table class="table">
                <thead>
                  <tr>
                    <th style="width: 20%;">Keys</th>
                    <th>Action</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td class="help shortcut"><kbd>?</kbd></td>
                    <td>Open this help</td>
                  </tr>
                  <tr>
                    <td class="next shortcut"><kbd>n</kbd></td>
                    <td>Next page</td>
                  </tr>
                  <tr>
                    <td class="prev shortcut"><kbd>p</kbd></td>
                    <td>Previous page</td>
                  </tr>
                  <tr>
                    <td class="search shortcut"><kbd>s</kbd></td>
                    <td>Search</td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div>

    </body>
</html>
